<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <script src="./Public/Home/js/jquery-1.8.2.min.js" type="text/javascript"></script>
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
			  <th width="50">Id</th>
			  <th width="260" style="text-align: center;">订单号</th>
			   <th width="150">收货人</th>
			   <th width="150">订单价格</th>
			   <th width="150">订单备注</th>
			   <th width="150">订单时间</th>
			  <th width="130" style="text-align: center;">操作</th>
			</tr>
			<?php foreach ($data as $v){?>
			<tr>
				<td><?php echo $v['oid']?></td>
				<td><?php echo $v['onum']?></td>
				<td><?php echo $v['oname']?></td>
				<td><?php echo $v['oprice']?></td>
				<td><?php echo $v['oremarks']?></td>
				<td><?php echo date('Y-m-d', $v['otime'])?></td>
				<td>
					<select name="ostate">
						<option <?php if($v['ostate']=='未发货'){?>
                selected='selected'
               <?php }?> value="未发货">未发货</option>
						<option <?php if($v['ostate']=='已发货'){?>
                selected='selected'
               <?php }?> value="已发货">已发货</option>
						<option <?php if($v['ostate']=='已付款'){?>
                selected='selected'
               <?php }?> value="已付款">已付款</option>
						<option <?php if($v['ostate']=='未付款'){?>
                selected='selected'
               <?php }?> value="未付款">未付款</option>
					</select>
					<input type="hidden" name="oid" id="" value="<?php echo $v['oid']?>" />
				</td>
			</tr>
			<?php }?>
		</table>
		<script type="text/javascript">
			$(function(){
				$('[name=ostate]').change(function(){
					var ostate=$(this).find('option:selected').val();
					var oid=$(this).next().val();
					$.ajax({
						type:"post",
						url:"<?php echo U('List/index')?>",
						data:{
							oid:oid,
							ostate:ostate
						},
						dataType:'json',
						success:function(phpData){
						}
					});
				})
			})
		</script>
	</body>
</html>
